﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using ShopingList.DBDal;
using ShopingList.DBModel;

namespace ShopingList.Dal
{
    public class shopListDal : dbBase
    {
        /// <summary>
        /// 查询全部
        /// </summary>
        /// <returns></returns>
        public async Task<List<shopList>> SelectAll()
        {
            return await helpClass.Database.Table<shopList>().ToListAsync();
        }

        public async Task<int> AddData(List<shopList> shopLists)
        {
          return await  helpClass.Database.InsertAllAsync(shopLists);
        }

        public async Task<int> AddData(shopList shopList)
        {
            return await helpClass.Database.InsertAsync(shopList);
        }
    }
}
